beginItemDrag: function(source) {
this.emit('item-drag-begin');
- this._inDrag = true;
+ this._inItemDrag = true;
},
cancelledItemDrag: function(source) {
},
endItemDrag: function(source) {
+ if (!this._inItemDrag)
+ return;
this.emit('item-drag-end');
- this._inDrag = false;
+ this._inItemDrag = false;
},
beginWindowDrag: function(window) {
this.emit('window-drag-begin', window);
- this._inDrag = true;
+ this._inWindowDrag = true;
},
cancelledWindowDrag: function(window) {
},
endWindowDrag: function(window) {
+ if (!this._inWindowDrag)
+ return;
this.emit('window-drag-end', window);
- this._inDrag = false;
+ this._inWindowDrag = false;
},
focusSearch: function() {
shouldToggleByCornerOrButton: function() {
if (this.animationInProgress)
return false;
- if (this._inDrag)
+ if (this._inItemDrag || this._inWindowDrag)
return false;
if (this._activationTime == 0 || Date.now() / 1000 - this._activationTime > OVERVIEW_ACTIVATION_TIMEOUT)
return true;